<?php
	include "../../public/commom/config.php";
	include "../lock2.php";
?>

<!DOCTYPE html>
<html>
	
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
	</head>
	
	<body>
			<h1>添加品牌</h1>
			<form action="add1.php" method="post" enctype="multipart/form-data">
				<label>
					品牌名称：
					<input type="text" name="name" placeholder="请输入名称.." autocomplete="off" />
				</label>
					<label>
						品牌分类：
						<select name="class_id">
							<?php
								$sql = "SELECT * FROM class";
							
								$result = mysqli_query($conn, $sql);
								
								while($row = mysqli_fetch_array($result)) {
									echo "<option value=" . $row["id"] . ">" . $row["name"] . "</option>";
								}
								
								mysqli_close($conn);
							?>
						</select>
					</label>
				<label>
				上传图片：
				<input type="file" name="img" accept="image/gif, image/jpeg, image/png, image/jpg, image/webp">		
			</label>
				<input type="submit" value="添加"/>
			</form>
	</body>
	
</html>